<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>短信统计</title>
	<link rel="stylesheet" type="text/css" href="../js/jquery-easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../js/jquery-easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../js/jquery-easyui/demo/demo.css">
	<script type="text/javascript" src="../js/jquery-easyui/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="../js/jquery-easyui/jquery.easyui.min.js"></script>
</head>
<script type="text/javascript">
	$(function(){
		$('#tables').treegrid({
			title:'短信统计',
			width: 960,
			height: 600,
			nowrap: false,
			animate: true,
			collapsible:true,
			pagination: true,
			rownumbers: true,
			pageSize:20,
			pageList:[20, 30, 50, 100],
			url: '../cgi-bin/sms_data.py',
			idField: 'id',
			treeField: 'sender',
			frozenColumns:[[
				{
					title:'sender',field:'sender',width:400, formatter:function(value){
				    	return '<span style="color:red">'+value+'</span>';
				    }
			     }
			]],
			columns: [[
				{title:'条数', field:'count', width: 200}
			]],
			onBeforeLoad: function(row, param) {
				if(row) {
					$(this).treegrid('options').url = '../cgi-bin/sms_c_data.py';
				} else {
					$(this).treegrid('options').url = '../cgi-bin/sms_data.py';
				}
			}
		});
	});
</script>
<body>
<table id="tables"></table>

</body>
</html>